import Vue from 'vue'
import Vuex from 'vuex'
import api from '../util/apis/api-patrol.js'

Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		userInfo: {}
	},
	mutations: {
		SET_USER_INFO: function(state, userInfo) {
			state.userInfo = userInfo
		}
	},
	actions: {
		// 设置用户信息
		// setUserInfo: function({
		// 	commit
		// }, userInfo) {
		// 	commit('SET_USER_INFO', userInfo);
		// }
	},
	getters: {
		userInfo: function(state) {
			return state.userInfo;
		}
	}
})

export default store
